# Contributor: Charles Wimmer <charles@wimmer.net>
# Maintainer: Charles Wimmer <charles@wimmer.net>
pkgname=junit2html
pkgver=31.0.2
pkgrel=0
pkgdesc="Simple self-contained python tool to produce a single html file from a single junit xml file"
url="https://gitlab.com/inorton/junit2html"
arch="noarch"
license="MIT"
depends="py3-jinja2"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest"
builddir="$srcdir/$pkgname-v$pkgver"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://gitlab.com/inorton/junit2html/-/archive/v$pkgver/junit2html-v$pkgver.tar.gz"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
d0c878478b9146226ef16a9e40c0e1bc679a065ce94c185e6e52be19c1d1eade11193bb8aed8c7894d76b5922de20dffdd5d7f0ba2954d8f41b062611a9024fa  junit2html-31.0.2.tar.gz
"
